import { ServerOptions } from 'vite';

const dev = 'http://vm31.leap.com:8070';
const test = 'http://demo14.test.com:8000';

const target = test;

const devServer = (
  options: ServerOptions,
): ServerOptions => ({
  ...options,
  open: true,
  // 代理配置
  proxy: {
    '/api/.*': {
      target,
      changeOrigin: true,
      timeout: 1000,
    },
  },
});

export { devServer };
